package com.neusoft.elm.view;

import com.neusoft.elm.dao.AdminDao;
import com.neusoft.elm.dao.impl.AdminDaoImpl;
import com.neusoft.elm.po.Admin;

import java.util.Scanner;

public class AdminViewImpl implements AdminView{

    Scanner sc = new Scanner(System.in);

    @Override
    public Admin login(){
        System.out.println("请输入管理员名称: ");
        String adminName = sc.next();
        System.out.println("请输入密码: ");
        String password = sc.next();

        AdminDao dao = new AdminDaoImpl();
        return dao.getAdminByNameByPass(adminName,password);
    }
}
